package com.tao.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName NacosConfigController
 * @Author HETAO
 * @Date 2020/5/12 15:57
 */
@RestController
@RequestMapping("config")
@Slf4j
@RefreshScope
public class NacosConfigController {
    @Value("${config.info}")
    private String configInfo;

    @GetMapping("info")
    public String config() {
        log.info(configInfo+">><><");
        return configInfo;
    }
}
